home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1993 October: Windmill on DISC / ADC Developer CD (1993-10) (''Windmill On DISC'')_iso / Dev.CD Oct 93.iso / Utilities / Installer v3.4.3 / Examples - Installer 3.4 / SimpleEasyOnly.r < prev   
Encoding:
Text File  |  1993-06-15  |  4.5 KB  |  124 lines  |  [TEXT/MPS ]

  1. /*------------------------------------------------------------------------------
  2.  *
  3.  *    Apple Macintosh Developer Technical Support
  4.  *
  5.  *  Installer 3.2 sample: very simple installation (Easy Installation only)
  6.  *
  7.  *    File:        SimpleEasyOnly.r -    Rez Source
  8.  *
  9.  *  Modifications:
  10.  *        5/19/93: RRK Changed Target file spec typeCrMustMatch flag setting to
  11.  *                        typeCrNeedNotMatch and included comment that this will
  12.  *                        allow the replacement of the target file if for some reason
  13.  *                        the file or creator are different.
  14.  *                     Used InstallerCommon.r defines.
  15.  *
  16.  *    by:            Jon Zap
  17.  *  updated for use with Installer 3.4 by: Rich Kubota 9/1/92
  18.  *
  19.  *    Copyright © 1991 Apple Computer, Inc.
  20.  *    All rights reserved.
  21.  *
  22.  *------------------------------------------------------------------------------
  23.  *
  24.  * Install application "TeachText" into the folder "Root":Installed Application
  25.  * It demonstrates only Easy Installation (Custom Installation is not supported)
  26.  *----------------------------------------------------------------------------*/
  27.  
  28. #include "InstallerTypes.r"
  29. #include "InstallerCommon.r"
  30.  
  31. /* You can build and complete the script with the following lines:
  32. # Note: set up floppies with the appropriate names and contents before running scriptcheck
  33. # or set up folders with the same names and contents as the floppies
  34. # put these folders in the same folder as the script or at the root directory of same disk
  35.  
  36.     rez -o "SimpleEasyOnly" -t 'bbkr' -c 'bbkr' "SimpleEasyOnly.r"
  37.     setfile -a i "SimpleEasyOnly"        #mark Inited
  38.     scriptcheck -p "SimpleEasyOnly"
  39. */
  40.  
  41. /* Definitions for the rule */
  42. #define rlDoInstall                1000
  43.  
  44. /* Definitions for the file spec atoms (specifications for source and destination files) */
  45. #define fsSourceProgram            2000
  46. #define fsTargetProgram            2001
  47.  
  48. /* This is the name of the source disk */
  49. #define ProgramDisk "Program Disk:"
  50.  
  51. /* This is the target path for where we want to install the file. */
  52. #define TargetPath    ":Installed Application:"
  53.  
  54. /* Definition for the package. */
  55. #define pkTheProgram            3000
  56.  
  57. /* Definition for the file atom */
  58. #define faProgram                4000
  59.  
  60. /************************** Rule resources for Easy Install **********************************/
  61.  
  62. /* need 1 and only 1 framework to tell the installer how to process the rule(s) */
  63. resource 'infr' (1) {
  64.     format0  {{
  65.         pickAll,    {rlDoInstall},    /* Process "all" of the rules */
  66.     }};
  67. };
  68.  
  69. resource 'inrl' (rlDoInstall) {
  70.     format0 {{
  71.         addUserDescription {"Click Install button to install\n"}, /* message to appear in Easy Install screen */
  72.         addUserDescription {"• TeachText\n"},        /* message to appear in Easy Install screen */
  73.         addPackages {{pkTheProgram}}                /* we're only installing the program */
  74.     }};
  75. };
  76. /***************************** Package Resources ************************************************/
  77. resource 'inpk' (pkTheProgram) {
  78.     format0 {
  79.         doesntShowOnCustom,         /* Package doesn't appear in the Custom Install display */
  80.         removable,                    /* Package can be removed */
  81.         dontForceRestart,            /* no need to reboot after live install */
  82.         0,                             /* 'icmt' not used in a package that does not show on custom */
  83.         0,                            /* Package size (filled in by ScriptCheck) */
  84.         "", {                        /* package name not used in a package that does not show on custom    */
  85.             'infa', faProgram;
  86.         }
  87.     }
  88. };
  89.  
  90. /********************************************* File Specs ***********************************************/
  91. /* Source File Specs */
  92. resource 'infs' (fsSourceProgram) {
  93.     'APPL',                                /* File Type */
  94.     'ttxt',                                /* Creator */
  95.     kScriptCheckSetsDate,                /* require timestamp check of source file before install  */
  96.     noSearchForFile,                    /* Do not search the source disk for the file */
  97.     typeCrMustMatch,                    /* file type and creator on this file must match */
  98.     ProgramDisk"TeachText"                /* Path to the file */
  99. };
  100.  
  101. /* Target File Specs */
  102. resource 'infs' (fsTargetProgram) {
  103.     'APPL',                                /* File Type */
  104.     'ttxt',                                /* Creator */
  105.     kNoDateStampCheck,                    /* must be zero for target file spec */
  106.     noSearchForFile,                    /* Do not search the target disk for the file */
  107.     typeCrNeedNotMatch,                    /* file to be replaced even if F&C don't match  */
  108.     TargetPath"TeachText"                /* installation Path */
  109. };
  110.  
  111. /******************************************** File Atoms ************************************************/
  112. resource 'infa' (faProgram) {
  113.     format0 {
  114.         StdRemLeaveNewerCopy,            /* see InstallerCommon.r */
  115.         fsTargetProgram,                /* TARGET file spec */
  116.         fsSourceProgram,                 /* SOURCE file spec */
  117.         0,                                /* atom size (filled in by ScriptCheck) */
  118.         ""                                /* Atom Description (for a file Installer will use file name) */
  119.     };
  120. };
  121.  
  122.  
  123.  
  124.